<?php

require_once "core/application/models/mrequests/mrequests6.php";

class Mrequests7 extends Mrequests6 {

    private $_query;

    protected function issetFriend($playerId, $friendId) {
        /**
         *  Проверяем, может они уже дружат ?
         */
        DB::getInstance()->openConnectionToGS();
        $this->_query = "SELECT * FROM `friends` WHERE `player` = '$playerId' AND `friend` = '$friendId'";
        if (mysql_num_rows(DB::getInstance()->sql($this->_query))) {
            DB::getInstance()->closeConnection();
            unset($this->_query);
            return true;
        } else {
            DB::getInstance()->closeConnection();
            unset($this->_query);
            return false;
        }
    }

}

?>
